Random numbers have been used in many applications as a source of independent and unpredictable numbers. In practice, a device known as a random number generator (RNG) may provide these numbers, which may be evaluated to determine a degree of randomness. The randomness of the number (or a sequence of numbers) is often times quantified using tests of randomness to evaluate statistical quantities, such as frequency, repetition, and correlations. The results of these randomness tests may be compared to expected values to determine whether the random number is sufficiently random, and if the random number or sequence fails any of these tests, additional mathematical techniques, such as distillation, may be used to modify the random number or sequence into a more random form.
As noted above, the random numbers generated from RNGs may be tested after they have been generated. Conventionally, the testing for each sequence of numbers is performed independent of the RNG, and independent of each other. In other words, if a sequence of numbers generated from the RNG fails a test for randomness, this failure does not affect whether a subsequent sequence of numbers passes or fails the same test for randomness. Whether each sequence of numbers generated from the RNG passes or fails a test for randomness is not known by the conventional RNG prior to being generated. For example, in the case of a conventional pseudo-random number generator (PRNG), which may employ a mathematical algorithm for generating sequences of numbers that demonstrate a high degree of randomness, the randomness of a sequence produced by these algorithms may not be provable before the sequence is actually generated. Each sequence of numbers generated from the PRNG may be tested after it has been generated using one or more tests as noted above, but whether that sequence of numbers, before being generated, passes or fails the one or more tests is not known.
In recent times, so-called true random number generators (TRNGs) have been used instead of PRNGs in a variety of applications. A TRNG may rely on the uncertainty inherent to certain chaotic and quantum physical systems rather than the algorithmic definitions of randomness used in conventional PRNGs. In other words, the TRNG may draw on the lack of knowledge about the underlying physical state embodied by a device. An example of a conventional TRNG is based on a quantum physical system in which the tenants of quantum mechanics may provide a prescriptive definition for the absence of knowledge about a quantum system. For purposes of disclosure, a TRNG derived from a quantum physical system is referred to as a quantum random number generator (QRNG).
A conventional QRNG may generate a number using a two-step process: (1) preparation of a quantum physical system in a desired quantum statistical distribution followed by (2) measurement of the quantum physical system to yield numerical results. According to quantum theory, it may be possible to predict that the uncertainty of the measurement outcome is improved, and possibly maximized, when the quantum system is prepared as a superposition of the possible measurements; the measurement projects the prepared system into an outcome that may be proportional to its prepared amplitude. Multiple uses of the QRNG may then yield a sequence of numbers that can be subjected to tests of randomness. In principal, preparing the quantum state in perfect superposition, and conducting a measurement perfectly aligned with the quantum preparation may yield maximum entropy or randomness. In practice, there may be deviations from this ideal, such as a nonpure quantum preparation or a misaligned measurement. Measurement misalignments may include both physical and mathematical misalignments.
As an example, when the quantum statistical distribution of the prepared quantum system corresponds to an equal superposition of the possible measurement outcomes, the probabilistic measurement process may ensure that the outcomes are maximally random. In practice, however, the quantum system may be prepared with some bias that favors one or more outcomes over the others. These biases may correspond to deviations in the quantum statistical distribution of the prepared quantum system, which conventional QRNGs overlook. As a result, the random numbers generated from QRNG, like the PRNG and other conventional RNGs, are tested after they have been generated and independent of the random number generator, itself. In other words, the randomness of the output from the conventional RNGs described above, including the TRNGs and QRNGs, may not be known beforehand, or before the random number is actually generated.